import logging
import yagmail


def log_set():
    logging.basicConfig(filename='weidudianshanglog521.txt',filemode='w',level=logging.DEBUG,format="%(asctime)s -- %(filename)s -- %(message)s")


def send_mail(filname):
    mail=yagmail.SMTP(user="2179037145@qq.com",password="lzjrlbpnkfdbecii",host='smtp.qq.com',encoding="utf-8")
    mail.send(to="2179037145@qq.com",subject="维度电商系统商品评论接口测试报告",contents="今日报告请查收",attachments=filname)
